-- 流体需求站

out = {}
-- 阈值为蓝色信号
var.limit = green['signal-blue']

for k, v in pairs(green) do
    -- 跳过信号S, C, L, P, 蓝色信号
    if k == 'signal-C' or k == 'signal-L' or k == 'signal-P' or k == 'signal-S' or k == 'signal-blue' then
        -- do nothing
    else
        -- 如果没有列车驶来，则需求为1
        if green['signal-C'] == 0 and v < -var.limit then
            out['red/signal-green'] = 1
            out[k] = 1
            break
        end
    end
end

delay = 1